/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#include "MkRtmpServer.h"
#include "MkRtmpSession.h"
#include "MkMedia/MkFileSource.h"
#include "MkFlv/MkFlvMuxer.h"
#include "MkEvent/MkTimer.h"
#include "MkUtil/MkLog.h"

CMkRtmpServer::CMkRtmpServer(CMkEventPool* pEventPool, CMkTimer* pTimer, const MkMediaCallbacks& MediaCallbacks)
    : CMkTcpServer(pEventPool, pTimer, 1000000)
    , m_MediaCbs(MediaCallbacks)
{

}

CMkTcpSession* CMkRtmpServer::CreateNewSession(CMkEvent *pEvent, CMkTimer* pTimer)
{
    CMkRtmpSession *pSession = new CMkRtmpSession(pEvent, pTimer, this, m_MediaCbs);
    return pSession;
}

CMkRtmpServer::~CMkRtmpServer()
{

}